function dialog(title, form, options) {
	//将移除dialog移至open前，解决IE9/10下jquery异常问题
	$("#"+form).dialog("destroy").remove();
	$("#"+form).remove();
	var src = window.location.pathname + '?efFormEname=' + form;
	if (options && options.params)
		src += '&' + options.params;
	$('body').append($('<div style="display:none"/>')
			.attr({id: form, title: title}));
	$('#' + form).dialog({
		autoOpen : true,
		modal : true,
		height : options && options.height ? options.height : 600,
		width : options && options.width ? options.width : 800,
		zIndex : 9999,
		resizable: false,
		close: function(event, ui) {
			//$(event.target).dialog("destroy").remove();
			if (options && options.onclose)
				options.onclose(event, ui);
		}
	});
	
	//IE9 Iframe在DOM移动一次 加载js就会失败
	var frame = $('<iframe frameborder= "0" />').attr('src', src)
		.css({height : '100%', width : '100%'});
	$('#' + form).append(frame);
}

function closeDialog(name) {
	var dia = $('#' + name);
	dia.dialog('close');
}
